package com.itheima.exception;

public class ExceptionDemo2 {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5};

        try {
            System.out.println(arr[10]);
            System.out.println(2/0);
        }catch (ArrayIndexOutOfBoundsException e){
            System.out.println("数组越界异常");
        }catch (ArithmeticException e){
            System.out.println("算术异常");
        }
    }
}
